<template>
  <div class="home-view">
    <div class="hero-section">
      <h1 class="hero-title">欢迎来到 Code Studio</h1>
      <p class="hero-description">
        一个现代化的代码开发平台，为开发者提供最佳的编程体验
      </p>
      <div class="hero-actions">
        <a-button type="primary" size="large" class="action-btn">
          开始使用
        </a-button>
        <a-button size="large" class="action-btn">
          了解更多
        </a-button>
      </div>
    </div>

    <div class="features-section">
      <h2 class="section-title">核心特性</h2>
      <a-row :gutter="[24, 24]">
        <a-col :xs="24" :sm="12" :lg="8">
          <a-card class="feature-card" hoverable>
            <template #cover>
              <div class="feature-icon">
                <span class="icon">🚀</span>
              </div>
            </template>
            <a-card-meta title="高性能" description="基于现代化技术栈，提供极致的性能体验" />
          </a-card>
        </a-col>
        <a-col :xs="24" :sm="12" :lg="8">
          <a-card class="feature-card" hoverable>
            <template #cover>
              <div class="feature-icon">
                <span class="icon">🎨</span>
              </div>
            </template>
            <a-card-meta title="美观界面" description="精心设计的用户界面，提供优雅的视觉体验" />
          </a-card>
        </a-col>
        <a-col :xs="24" :sm="12" :lg="8">
          <a-card class="feature-card" hoverable>
            <template #cover>
              <div class="feature-icon">
                <span class="icon">⚡</span>
              </div>
            </template>
            <a-card-meta title="快速开发" description="丰富的组件库和工具，助力快速开发" />
          </a-card>
        </a-col>
      </a-row>
    </div>
  </div>
</template>

<script setup lang="ts">
// 首页组件
</script>

<style scoped>
.home-view {
  padding: 0;
}

.hero-section {
  text-align: center;
  padding: 80px 0 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  margin: -24px -24px 40px;
  border-radius: 0 0 16px 16px;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  color: white;
}

.hero-description {
  font-size: 18px;
  margin-bottom: 32px;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  height: 44px;
  padding: 0 32px;
  font-size: 16px;
  border-radius: 8px;
}

.features-section {
  padding: 40px 0;
}

.section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 40px;
  color: #262626;
}

.feature-card {
  height: 100%;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.feature-icon {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.icon {
  font-size: 48px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hero-section {
    padding: 60px 20px 40px;
    margin: -16px -16px 30px;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .hero-description {
    font-size: 16px;
  }
  
  .action-btn {
    height: 40px;
    padding: 0 24px;
    font-size: 14px;
  }
  
  .section-title {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 40px 12px 30px;
    margin: -12px -12px 20px;
  }
  
  .hero-title {
    font-size: 28px;
  }
  
  .hero-description {
    font-size: 14px;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .action-btn {
    width: 200px;
  }
}
</style>